<template>
  <el-card class="box-card">
    <div slot="header" class="clearfix">
      <span>搜索的歌曲</span>
    </div>
    <!-- 内容 -->
    <div class="content">
      <el-table  @row-click="click" style="width: 100%">
        <!-- 索引 -->
        <el-table-column type="index" label="索引" :index="indexMethod">
          
        </el-table-column>
        <!-- 歌曲 -->
        <el-table-column property="name" label="歌曲" width="120">
         
        </el-table-column>
        <!-- 专辑 -->
        <el-table-column property="artists.name" label="专辑" width="120">
          
        </el-table-column>
        <!-- 歌手 -->
        <el-table-column property="album.name" label="歌手"> 
          
        </el-table-column>
      </el-table>
    </div>
  </el-card>
</template>

<script>
import { get } from "../api/music";
export default {
  data() {
    return {
      tableData: [],
     
    };
  },
  methods: {
    getData(){
      let res = JSON.parse(sessionStorage.getItem('value'))
      this.tableData = res
      console.log(res,'wo');
    },
    indexMethod(index){
      return index+1
    },
    click() {
      
    },
  },
  created() {
    this.getData()
  },
};
</script>

<style>
</style>